package com.bite.demo.mapper;

import com.bite.demo.model.ArticleInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ArticleInfoMapper {
   @Select("SELECT ta.id,ta.title,ta.content,ta.uid,tb.username,tb.age,tb.gender " +
           "FROM articleinfo ta LEFT JOIN userinfo tb ON ta.uid = tb.id " +
           "WHERE ta.id = #{id}")
    ArticleInfo queryUserByUid(Integer id);

}
